package cl.indumotora.induapprecepcion.app;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.CompoundButton.OnCheckedChangeListener;

public class CiaseguroActivity extends Activity {
//	ly_id_cia_seg, ly_id_text_poliza, ly_id_cont_poliza, id_t_poliza, id_cont_t_poliza
	LinearLayout ly_ocultar;
	CheckBox chc_ocultar_chk;
	
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.fragment_cia_seguro);
        
        chc_ocultar_chk = (CheckBox)findViewById(R.id.chk_id_cia_seg);
        ly_ocultar = (LinearLayout)findViewById(R.id.ly_id_cia_seg);
        
        chc_ocultar_chk.setOnCheckedChangeListener(new OnCheckedChangeListener() {
			
  			@Override
  			public void onCheckedChanged(CompoundButton buttonView,
  					  boolean isChecked) {
  			       if(isChecked)
  			    	   
  				  ((Spinner)findViewById(R.id.spn_op_servicios)).setVisibility(View.VISIBLE);
  			       
  				 else
  					 
  				  ((Spinner)findViewById(R.id.spn_op_servicios)).setVisibility(View.GONE);;
  				
  			}
  		});
	
	
    }	
}
